trim elements of array php

41

$result = array_map('trim', $source_array);
$arr = array( " John ", "Jacob ", " Tom ", " Tim ");
$result = array_map('trim', $arr)

Comments

Submit
0 Comments